export let isMobile = function () {
    let mobile_type = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
    return mobile_type ? true : false;
}

export let isUrl = function (url) {
    let reg = /^http(s)?:\/\//;
    if (reg.test(url)) {
        return true;
    } else {
        return false;
    }
}

export let isWeixin = function() {
    return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1;
};


